package com.mall.web.controller.monitor;

import com.mall.common.core.controller.BaseController;
import com.mall.framework.web.domain.Server;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * 服务器监控
 *
 * Created by zhonglin on 2020/4/8.
 */
@Controller
@RequestMapping("/monitor/server")
public class ServerController
    extends BaseController {

  private String prefix = "monitor/server";

  @RequiresPermissions("monitor:server:view")
  @GetMapping()
  public String server(ModelMap mmap)
      throws Exception {

    Server server = new Server();
    server.copyTo();
    mmap.put("server", server);
    return prefix + "/server";
  }

}
